<?php
class Boleta extends AppModel {

	var $name = 'Boleta';

	var $belongsTo = array(
		'Modo',
		'Provincia',
		'Cantone',
		'Distrito'
	);
	var $hasAndBelongsToMany = array(
		'Dia' => array(
			'className' => 'Dia',
			'joinTable' => 'boletas_dias',
			'foreignKey' => 'boleta_id',
			'associationForeignKey' => 'dia_id'
		)
	);
	var $hasMany = array(
		'Area' => array(
			'className' => 'Area',
			'foreignKey' => 'boleta_id',
			'dependent' => true
		)
	);
	
	var $validate = array(
		'cedula' => array('notempty'),
		'nombre' => array('notempty'),
		'egreso' => array('notempty')
	);
}
?>